package com.start.avue.calculate;

import java.math.BigDecimal;
import java.util.Collection;

/**
 * 统计
 */
public class StartMinCalculate implements StartCalculate {
    public static String CALCULATE_TYPE_MIN ="min";
    @Override
    public String calculateType() {
        return CALCULATE_TYPE_MIN;
    }

    @Override
    public BigDecimal calculate(BigDecimal pre, BigDecimal cur, int index, Collection<?> collection) {
        return pre.min(cur);
    }
}
